<html>
<body bgcolor="<?php echo $color;?>">
<form action="<?php echo $_SERVER['PHP_SELF'];?>" method="GET">
Color: 
<select name='color'>
    <option value='red' <?php echo (strcmp('red',$color) === 0) ? 'selected="selected"' : '';?>>RED</option>
    <option value='green' <?php echo (strcmp('green',$color) === 0) ? 'selected="selected"' : '';?>>GREEN</option>
    <option value='blue' <?php echo (strcmp('blue',$color) === 0) ? 'selected="selected"' : '';?>>BLUE</option>
    <option value='yellow' <?php echo (strcmp('yellow',$color) === 0) ? 'selected="selected"' : '';?>>YELLOW</option>
    <option value='pink' <?php echo (strcmp('pink',$color) === 0) ? 'selected="selected"' : '';?>>PINK</option>
    <option value='indigo' <?php echo (strcmp('indigo',$color) === 0) ? 'selected="selected"' : '';?>>INDIGO</option>
    <option value='cyan' <?php echo (strcmp('cyan',$color) === 0) ? 'selected="selected"' : '';?>>CYAN</option>
	<option value='violet' <?php echo (strcmp('violet',$color) === 0) ? 'selected="selected"' : '';?>>VIOLET</option>
	</select>
<input type='submit' value='ENTER' />
</form>
<hr>
<table border = "2">
<hr>
<br>
<center><img style="border:10px black" src="<?php 
			if ($color == 'red'){
				echo 'cp1.jpg';
			} elseif ($color == 'green'){
				echo 'cp2.jpg';
			} elseif ($color == 'blue'){
				echo 'cp3.jpg';
			} elseif ($color == 'yellow'){
				echo 'cp4.jpg';
			} elseif ($color == 'pink'){
				echo 'cp5.jpg';
			} elseif($color == 'indigo'){
				echo 'cp6.jpg';
			} elseif ($color == 'cyan'){
				echo 'cp7.jpg';
			}elseif ($color == 'violet'){
				echo 'cp8.jpg';
				}
			?>" width='500' height='500' />

</center>
</table>
</body>
</html>